home *** CD-ROM | disk | FTP | other *** search
- Path: news.danadata.dk!usenet
- From: dantek <dantek@danadata.dk>
- Newsgroups: comp.lang.c++
- Subject: Using MSVC and the _WEP
- Date: Thu, 25 Jan 1996 12:14:12 +0100
- Organization: Dantek A/S
- Message-ID: <31076604.4250@danadata.dk>
- NNTP-Posting-Host: 193.162.156.18
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win95; I)
-
- Hi
- I use MSVC v 1.5 under Windows NT
- I have made a 16-bit DLL that uses the MFC in such a way there is
- nothing
- visual in the DLL.
- When the last client is shutdown I would like to clean up the memory and
- disconnect from ODBC.
- I have read that I should make a _WEP function and so I have done. The
- only
- problem is that it is never called. In the DLL I have no
- CWinApp-inherited
- class, but do I have to have an CWinApp::ExitInstance() function?
- I have read that in the .DEF-file I have to define WEP @1 RESIDENTNAME
- eventhough I dont implement it.
- The _WEP function is defined as:
-
- extern "C" int __far __pascal _WEP(int nExitType);
-
- // Put _WEP code into same fixed segment as the WEP function.
- #pragma alloc_text(WEP_TEXT, _WEP)
-
- extern "C" int __far __pascal _WEP(int nExitType)
- {
- //
- // Exit cleanup code goes here.
- Done();
- //
- return nExitType ;
- }
-
- I know that my _WEP-function is never called because I placed a
- breakpoint
- inside it.
- Has anyone had the same problem as me and knows the answer?
-
- I hope you can answer my questions?
- Yours Sincerly
-
- Kristian Lippert
-
- e-mail: dantek@danadata.dk (Kristian Lippert)
- snail-mail: Dantek a/s
- att: Kristian Lippert
- Vestergade 41
- 8600 Silkeborg
- Denmark
- phone: +45 86 80 30 99
- fax: +45 86 80 30 94
-